<div class="row">
	<div class="col-lg-offset-2 col-lg-5">
		<%= form_for @event do |f| %>
			<div class="form-group">
				<label class="control-label">Event Name</label>
				<%= f.text_field :name, class: "form-control" %>
				<% if @event.errors[:name].present? %>
                	<div class="error-message"><%=  @event.errors[:name][0]%></div>
               	<% end %>
			</div>
			<div class="form-group">
				 <label class="control-label">Start Date & Time</label>
				 <%= f.datetime_select :start_date_time, class: "form-control", prompt: true %>
				 <% if @event.errors[:start_date_time].present? %>
                	<div class="error-message"><%=  @event.errors[:start_date_time][0]%></div>
               	<% end %>
			</div>
			<div class="form-group">
				 <label class="control-label">End Date & Time</label>
				 <%= f.datetime_select :end_date_time, class: "form-control", prompt: true %>
				 <% if @event.errors[:end_date_time].present? %>
                	<div class="error-message"><%=  @event.errors[:end_date_time][0]%></div>
               	<% end %>
			</div>
			<div class="form-group">
				 <label class="control-label">Location</label>
				 <%= f.text_field :location, class: "form-control" %>
				 <% if @event.errors[:location].present? %>
                	<div class="error-message"><%=  @event.errors[:location][0]%></div>
               	<% end %>
			</div>
			<div class="form-group">
				<label class="control-label">Owner</label>
				<%= f.collection_select :owner, User.all, :id, :email, {}, class: "form-control" %>
				<% if @event.errors[:owner].present? %>
                	<div class="error-message"><%=  @event.errors[:owner][0]%></div>
               	<% end %>
			</div>
			<div class="form-group">
				<label class="control-label">Status</label>
				<%= f.collection_select :event_status_id, EventStatus.all, :id, :name, {}, class: "form-control", include_prompt: true %>
				<% if @event.errors[:event_status_id].present? %>
                	<div class="error-message"><%=  @event.errors[:event_status_id][0]%></div>
               	<% end %>
			</div>
			<div class="form-group">
				<label class="control-label">Priority</label>
				<%= f.collection_select :priority_id, Priority.all, :id, :name, {}, class: "form-control" %>
				<% if @event.errors[:priority_id].present? %>
                	<div class="error-message"><%=  @event.errors[:priority_id][0]%></div>
               	<% end %>
			</div>
			<div class="form-group">
				<%= f.submit "Save", class: "btn btn-warning" %>
				<%= link_to "Back", events_path , class: "btn btn-primary" %>
			</div>
		<% end %>
	</div>
</div>